package models;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;

import play.db.ebean.Model;
import play.db.ebean.Model.Finder;

@Entity
public class edu_comments extends Model{
	
	@Id
	public int comment_id;
	
	public int user_id;
	
	public int course_id;
	
	public int comment_date;
	
	public int reply_to_id;
	
	public String subject;
	
	public String comment;
	
	public static Finder<Long,edu_comments> find = new Finder<Long,edu_comments>(Long.class, edu_comments.class);
	
	public static List<edu_comments> listCourseComments(int course_id)
	{				
		return edu_comments.find.where().eq("course_id", course_id).findList(); 
	}
		

}
